﻿using ChessModel;
using System;
using System.Collections.Generic;

namespace ChessBench
{
    class Pawn01
    {
        // Exercise capture en passant.
        static void Main ()
        {
            string err;

            ChessGame game = new ChessGame (4, 0, 6, 6);
            game.Setup (new Pawn (Player.White), 4, 3);
            game.Setup (new Pawn (Player.Black), 3, 6);
            game.Setup (new Pawn (Player.White), 6, 1);
            game.Setup (new Pawn (Player.Black), 5, 4);

            Console.WriteLine (game.Board);
            Console.WriteLine ("Turn: {0}", game.PlayerTurn);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (4, 3, 4, 4);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (3, 6, 3, 4);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (4, 4, 3, 5);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            game.MakeMove (5, 4, 5, 3);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);

            err = game.MakeMove (6, 1, 6, 3);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0} {1}\n", game.Status, err);

            game.MakeMove (5, 3, 6, 2);
            Console.WriteLine (game.Plies.ToString ());
            Console.WriteLine (game.Board);
            Console.WriteLine ("Status: {0}\n", game.Status);
        }
    }
}
